﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XS.Tunnel.Cad.SteelBracing.Infrastructure;

namespace XS.Tunnel.Cad.SteelBracing.Component.SteelShotcrete
{

    public class SteelPlateParameter
    {

        public string Color { get; set; }

        /// <summary>
        /// 钢板类型
        /// </summary>
        internal SteelType SteelType { get; set; }

        // 中部链接钢板  仰拱  拱圈上
        // 墙脚链接钢板
        // 仰拱与边墙链接  斜的  必须是全断面才会有的 

        /// <summary>
        /// 长
        /// </summary>
        public double Length { get; set; }
        /// <summary>
        /// 宽
        /// </summary>
        public double Weight { get; set; }
        /// <summary>
        /// 厚
        /// </summary>
        public double Thickness { get; set; }
        /// <summary>
        /// 个数
        /// </summary>
        public double Count { get; set; }

        public double GetUnilateral()
        {

            switch (Count)
            {
                case 1:
                    if (SteelType == SteelType.Middle)
                    {
                        return Thickness / 2;
                    }
                    return Thickness;
                   
                case 2:
                    if (SteelType == SteelType.Middle)
                    {
                        return Thickness;
                    }
                    return Thickness*2;
                case 4:
                    if (SteelType == SteelType.Middle)
                    {
                        return Thickness*2;
                    }
                    return Thickness*4;
                default:
                    throw XSException.Oh($"{Count}个钢板数未实现");
            }

        }



    }
    /// <summary>
    /// 钢板类型
    /// </summary>
    public enum SteelType
    {
        /// <summary>
        /// 中部钢板 仰拱和拱圈上
        /// </summary>
        Middle,
        /// <summary>
        ///  仰拱链接墙脚钢板 斜的 只有全断面才会右
        /// </summary>
        InvertedJoinWallFoot,
        /// <summary>
        /// 墙脚链接钢板
        /// </summary>
        WallFoot
    }





}
